var isShow = true;
$(".topbar-shop").hover(function () {
    if (isShow) {
        $(".minishopmenu").css({
            "display": "block",
            backgroundColor: "white",
        })
        $(".topbar-shop").css({
            backgroundColor: "white",
        })
        $(".topbar-shop a").css({
            color: "orange"
        })
    } else {
        $(".minishopmenu").css({
            "display": "none",
            color: "#333",
            backgroundColor: "white"
        })
        $(".topbar-shop").css({
            backgroundColor: "#333"
        });
        $(".topbar-shop a").css({
            color: "#b3b3b3"
        })
    }
    isShow = !isShow;
})


$(".header-search input:eq(1)").mouseover(function () {
    //    console.log("aaa");
    $(".header-search input:eq(0)").css({
        borderTop: "1px solid gray",
        borderLeft: "1px solid gray",
        borderBottom: "1px solid gray",
    })
    $(".header-search input:eq(1)").css({
        border: "1px solid #ff6700"
    })

})
// ll
$(".header-search input:eq(0)").mouseover(function () {
    //    console.log("aaa");
    $(".header-search input:eq(0)").css({
        borderTop: "1px solid gray",
        borderLeft: "1px solid gray",
        borderBottom: "1px solid gray",

    })
    $(".header-search input:eq(1)").css({
        border: "1px solid gray"

    })

})

// kk
$(".header-search input:eq(0)").mouseout(function () {
    //    console.log("aaa");
    $(".header-search input:eq(0)").css({
        borderTop: "1px solid #b0b0b0",
        borderLeft: "1px solid #b0b0b0",
        borderBottom: "1px solid #b0b0b0",

    })
    $(".header-search input:eq(1)").css({
        border: "1px solid #b0b0b0"

    })

})

$(".header-search input").focus(function () {
    $(".header-search-content").css({
        display: "none",

    })
    $(".header-search input:eq(0)").css({
        border: "1px solid #ff6700"
    })
    $(".header-search input:eq(1)").css({
        border: "1px solid #ff6700"
    })
    $(".aside-menu").css({
        display: "block",
        border: "1px solid rgb(255,103,0)"
    })
    //  kk
    $(".header-search input:eq(0)").unbind("mouseout");
    $(".header-search input:eq(0)").unbind("mouseover");

})
$(".header-search input").blur(function () {
    $(".header-search input:eq(0)").bind("mouseover");
    $(".header-search input:eq(0)").bind("mouseout");
    $(".header-search-content").css({
        display: "block"
    })
    $(".header-search input:eq(0)").css({
        border: "1px solid #b0b0b0"
    })
    $(".header-search input:eq(1)").css({
        border: "1px solid #b0b0b0"
    })
    $(".aside-menu").css({
        display: "none"
    })
    $(".header-search input:eq(0)").bind("mouseout");
    $(".header-search input:eq(0)").bind("mouseover");
})





$(".header-search input:eq(1)").mouseout(function () {
    $(".header-search input:eq(0)").css({
        borderTop: "1px solid #b0b0b0",
        borderLeft: "1px solid #b0b0b0",
        borderBottom: "1px solid #b0b0b0"
    })
})
$(".header-search input:eq(1)").mouseout(function () {

    $(".header-search input:eq(1)").css({
        border: "1px solid #b0b0b0"
    })
})

for (let i = 0; i < 9; i++) {
    $(".header-nav ul ").mouseenter(function () {
        $(".header-nav-pop").slideDown("fast")
    })
    $(".header-nav ul ").mouseleave(function () {
        $(".header-nav-pop").slideUp("fast")
    })
    $(".header-nav ul li").eq(i).mouseenter(function () {
        //  console.log("aaa"+i);
        $(".header-nav-pop-contenta2 img").attr("src", "images/" + i + ".png");
    })
    $(".header-nav ul li").eq(i).mouseleave(function () {

    })
}

// 轮播部分

$("#banner_menu_wrap").children().hover(function () {
    $(this).css("background", "#ff6700");
    $(this).children(".banner_menu_content").css("border", "1px solid #F0F0F0").show();
}, function () {
    $(this).css("background", "none");
    $(this).children(".banner_menu_content").css("border", "0px solid #F0F0F0").hide();
});

$(function () {
    var i = 0;
    var big_banner_pic = $("#big_banner_pic");
    var allimg = $("#big_banner_pic li").length;
    function img_change() {
        var img_i = i * -1226 + "px";
        big_banner_pic.animate({ opacity: ".2" }, 100, function () {
            big_banner_pic.css("left", img_i);
            big_banner_pic.animate({
                opacity: "1"
            }, 100);
        })
    }
    function automatic() {
        i += 1;
        if (i >= allimg) {
            i = 0;
        }
        img_change();
    }
    change_self_time = setInterval(automatic, 3000);

    $("#big_banner_change_wrap").hover(function () {
        clearInterval(change_self_time);
        $("#big_banner_change_wrap").children().show();
    }, function () {
        change_self_time = setInterval(automatic, 3000);
        $("#big_banner_change_wrap").children().hide();
    })
    $("#big_banner_change_prev").click(function () {
        i += 1;
        if (i >= allimg) {
            i = 0;
        }
        img_change();
    })
    $("#big_banner_change_next").click(function () {
        i -= 1;
        if (i <= 0) {
            i = allimg - 1;
        }
        img_change();
    })
})




var count = true;
$(".more span").click(function () {
    console.log(count);
    if (count == true) {
        $(".four2 ul").animate({
            left: "-1226px",
            top: "0px"
        }, 500)
        count = !count;
    }
    else {
        $(".four2 ul").animate({
            left: "0px",
            top: "0px"
        }, 500)
        count = !count;
    }
})
setInterval(function () {
    $(".four2 ul").animate({
        left: "-1266px",
        top: "0px",
    }, 1000)
    setTimeout(function () {
        $(".four2 ul").animate({
            left: "0px",
            top: "0px",
        }, 1000)
    }, 3000);
}, 8000)

// 图片切换部分



     $(".fiveFira1 .fiveFira1-aa").mouseover(function(){
         var i = $(this).data("index")
         console.log(i);
      
        //  console.log( $(this).parents(".fiveFira").siblings(".fiveFirc").find("img"));
         $(this).css({
             cursor: "pointer"
         })
     $(this).addClass("tab-change").siblings()
     .removeClass("tab-change");
    //   for(let a= 0;a < 9;a++){
        //   console.log(a);
           
          $(this).parents(".fiveFira").siblings(".fiveFirc").find("img")
        .attr("src","images/ima/"+i+".png"); 
    //   }      
     })

for(let b = 0; b < 7;b++ ){
    var isShow = true;
    $(".five-show li").hover(function(){
            if(isShow){
                console.log("aaa");
             
          $(this).find(".five-show-sec").stop().slideDown();
        }
        else{
           $(this).find(".five-show-sec").stop().slideUp();
        }   
        isShow = !isShow; 
    })
}











